Skip to content

Conversation

@RanaMoizHaider
Copy link
Contributor

This PR adds raw markdown file access via .md URLs so user can access raw markdown by add .md in the end of any documentation page (similar to Laravel's official docs). It also adds a "Copy as Markdown" button on all documentation pages to easily copy the opened documentation page as markdown.

Introduces a new controller method and route to serve raw markdown files for documentation. This allows direct access to the markdown source for a given platform, version, and page.
Introduces a new Alpine.js component and Blade view for copying the current documentation page as Markdown. The button is added to the table of contents section and includes visual feedback for successful copying. Also adds a copy icon component and integrates the new Alpine data into the app.
Copy link
Member

@simonhamp simonhamp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I click the "Copy as Markdown" button, it copies HTML to the clipboard, not markdown

@RanaMoizHaider
Copy link
Contributor Author

Fixed regex. It should work correctly now.

Copy link
Member

@simonhamp simonhamp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it!

@simonhamp simonhamp merged commit 63abd62 into NativePHP:main Sep 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants